/* 更新模态框样式 */
.update-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.update-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9);
  animation: modalShow 0.3s ease-out forwards;
}

@keyframes modalShow {
  to {
    transform: scale(1);
  }
}

.update-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.update-modal-header h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

.update-modal-body {
  padding: 24px;
  color: #333;
}

.update-modal-body p {
  margin: 8px 0;
  line-height: 1.5;
}

.update-notes {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.update-notes h4 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 1em;
}

.release-notes {
  white-space: pre-wrap;
  font-size: 0.9em;
  line-height: 1.4;
  color: #666;
}

.update-modal-footer {
  padding: 20px 24px;
  background: #f8f9fa;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* 进度条样式 */
.progress-container {
  margin: 16px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 33%, rgba(255,255,255,0.3) 33%, rgba(255,255,255,0.3) 66%, transparent 66%);
  background-size: 12px 12px;
  animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
  0% { background-position: 0 0; }
  100% { background-position: 12px 0; }
}

.progress-text {
  text-align: center;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.progress-speed {
  text-align: center;
  font-size: 0.9em;
  color: #6c757d;
}

/* Toast 消息样式 */
.update-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  max-width: 400px;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid #667eea;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.update-toast-info {
  border-left-color: #17a2b8;
}

.update-toast-success {
  border-left-color: #28a745;
}

.update-toast-error {
  border-left-color: #dc3545;
}

.update-toast-warning {
  border-left-color: #ffc107;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.toast-icon {
  font-size: 1.2em;
}

.toast-message {
  color: #495057;
  font-size: 0.9em;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.2em;
  color: #adb5bd;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: #f8f9fa;
  color: #6c757d;
}

/* 更新按钮样式 */
.update-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.update-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.update-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 更新状态指示器 */
.update-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.update-status.checking {
  background: #e3f2fd;
  color: #1976d2;
}

.update-status.available {
  background: #e8f5e8;
  color: #2e7d32;
}

.update-status.downloading {
  background: #fff3e0;
  color: #f57c00;
}

.update-status.downloaded {
  background: #e8f5e8;
  color: #2e7d32;
}

.update-status.error {
  background: #ffebee;
  color: #c62828;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .update-modal {
    width: 95%;
    margin: 20px;
  }
  
  .update-modal-footer {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .update-toast {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}